package com.jiazhong.Abstract.Demo01;

import com.jiazhong.Super.A;

public class Demo02 {
    public static void main(String[] args) {
        AA2 aa2=new AA2();
        aa2.time();
        BB2 bb2=new BB2();
        bb2.time();
    }
}
class AA2{
    public void time(){
        long star=System.currentTimeMillis();
        job();
        long end=System.currentTimeMillis();
        System.out.println(end=star);
    }
    public void job(){
        int sum=0;
        for (int i=1;i<=10000000;i++){
            sum+=i;
        }
    }
}
class BB2{
    public void time(){
        long star=System.currentTimeMillis();
        job();
        long end=System.currentTimeMillis();
        System.out.println(end=star);
    }
    public void job(){
        int sum=0;
        for (int i=1;i<=10000000;i++){
            sum*=i;
        }
    }
}
